﻿<UserControl x:Class="WpfImageDuplicates.FilterView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:y="clr-namespace:WpfImageDuplicates"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:vm="clr-namespace:ImageAppViewModels"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" KeyDown="UserControl_KeyDown">
    <UserControl.CommandBindings>
        <CommandBinding Command="{x:Static y:GeneralCommands.FilterSettingsCommand}" Executed="FilterSettings"/>
    </UserControl.CommandBindings>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="64"/>
            <ColumnDefinition Width="64"/>
            <ColumnDefinition Width="30"/>
            <ColumnDefinition Width="30"/>
            <ColumnDefinition Width="30"/>
            <ColumnDefinition Width="30"/>
            <ColumnDefinition Width="64"/>
        </Grid.ColumnDefinitions>
        <Border Width="140" HorizontalAlignment="Stretch" Height="Auto" Margin="0,0,0,0" Padding="1,1,1,1" BorderBrush="Black" BorderThickness="0,0,0,0">
            <TextBlock Text="{Binding Path=FilterType}" FontWeight="Bold"  FontSize="10"></TextBlock>
        </Border>
        <Button Grid.Column="1" FontSize="9" Padding="1,1,1,1" x:Name="btnFilterSettings" Content="Settings" 
                Command="{x:Static y:GeneralCommands.FilterSettingsCommand}" CommandParameter="{Binding}" />
        <Button Grid.Column="2" FontSize="9" Padding="1,1,1,1" x:Name="btnRemoveFilter" Content="Remove" Command="{x:Static y:GeneralCommands.RemoveFilterCommand}" 
                CommandParameter="{Binding}"/>
        <Button Grid.Column="3" FontSize="9" Padding="0,0,0,0" x:Name="btnMoveLeftAll" ToolTip="Move Filter to the top of the list (first)">
            <Button.Content>
                <Image x:Name="imgLeftAll" Width="16" Height="16" Stretch="Uniform" Margin="0,0,0,0" />
            </Button.Content>
        </Button>
        <Button Grid.Column="4" FontSize="9" Padding="0,0,0,0" x:Name="btnMoveLeft" ToolTip="Move Filter one space up / prior">
            <Button.Content>
                <Image x:Name="imgUp" Width="16" Height="16" Stretch="Uniform"  Margin="0,0,0,0" />
            </Button.Content>
        </Button>
        <Button Grid.Column="5" FontSize="9" Padding="0,0,0,0" x:Name="btnMoveRight" ToolTip="Move Filter one space down / later">
            <Button.Content>
                <Image x:Name="imgDown" Width="16" Height="16" Stretch="Uniform" Margin="0,0,0,0"/>
            </Button.Content>
        </Button>
        <Button Grid.Column="6" FontSize="9" Padding="0,0,0,0" x:Name="btnMoveRightAll" ToolTip="Move Filter to the bottom of the list (last)">
            <Button.Content>
                <Image x:Name="imgRightAll" Width="16" Height="16" Stretch="Uniform" Margin="0,0,0,0"/>
            </Button.Content>
        </Button>
        <ToggleButton Grid.Column="7" FontSize="9" x:Name="btnDisable" Content="{Binding ActiveOrDisabled}" IsChecked="{Binding Mode=TwoWay, Path=Active}" MouseEnter="btnDisable_MouseEnter" MouseLeave="btnDisable_MouseLeave" />
    </Grid>
</UserControl>
